package eventStrategies.physicalModel;

import model.IPhysicalDataModel;

import controller.IController;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.ReplyGetMassEvent;

public class ChangeMassStrategy extends IEventResponse {

	private IController controller;
	private IPhysicalDataModel physModel;
	
	public ChangeMassStrategy(IController controller, IPhysicalDataModel physModel) {
		super(ECodeEventList.REPLY_GET_MASS);
		this.controller = controller;
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		
		ReplyGetMassEvent fullEvent = (ReplyGetMassEvent) event;
		
		physModel.changeMass(fullEvent.mass);
		//QQQ does any other object have to be notified of a change in mass?  Other objects in the system, etc.?
	}
}
